1. Field of the Invention
The invention relates to methods for recording data to a high-density recording medium, and more particularly to methods for random sector writing data to a Blu-ray disc (BD).
2. Description of the Related Art
Optical discs are a widely used recording medium capable of containing a large amount of data. Particularly, there has recently been developed a high-density optical recording medium capable of recording/storing high-quality video data and high-quality audio data for long periods of time, for example, a Blu-ray disc (BD).
The BD is considered to be the next-generation optical recording solution capable of storing much more data than a conventional DVD. Blu-ray discs utilize picket code error correction. FIG. 1 is a schematic representation of the Blu-ray disc picket code. The pickets are columns inserted between columns of the main data at regular intervals. The main data is protected by a strong and efficient Reed Solomon code, and the pickets are protected by a second, independent and extremely strong Reed Solomon code. When decoding, first the picket columns are corrected. The correction information can be used to estimate the location of possible burst errors in the main data. The symbols at these locations (i.e. the location shown by the bold lines near the pickets symbols ‘X’) can be flagged as erasure when correcting the code words for the main data. This strategy of applying erasures is shown in FIG. 1.
A Blu-ray disc error correction block (ECC block) can store 64 kilobytes of user data. By specification standard, the data is protected by long distance code (LDC) which has 304 code words with 216 information symbols and has 32 parity symbols with a code word of length 248. These code words are interleaved two by two in the vertical direction such that a block of 152 bytes (i.e. there are four 38-bytes data)×496 bytes is formed as shown in FIG. 1. A Blu-ray disc ECC block contains 4 equally spaced picket columns. The leftmost picket (symbol ‘S’) is formed by the sync patterns at the start of each row. If the sync pattern is not detected properly, it may be an indication of a burst error, indicating that a symbol of a picket column must be corrected.
The other three pickets are protected by burst indicator subcode (BIS code). This BIS code has code words with 30 information symbols and 32 parity symbols giving a code word length of 62. The BIS code words are interleaved into three columns of 496 bytes each. Note that LDC code and the BIS code are two types of codes of Blu-ray disc, and both LDC code and the BIS code have the same number of parity symbols per code word and therefore only one Reed Solomon decoder is required to decode both codes.
BD-R supports random recording mode, or “random sector write”. It is possible to record user data randomly on a BD-R disc on a 64 Kbytes ECC Cluster basis. The BD-R drive applies a space bit map (SBM) to manage recorded/unrecorded areas during the random recording mode.
FIG. 2 shows DRAM mapping of the Blu-ray disc. According to the Blu-ray Specification standard, the minimum recording unit for Blu-ray disc is a data cluster 10, which comprises 32 data sectors (X.0˜X.31), or 304 code words (cw.0˜cw.303). In FIG. 2, two data sectors comprise 19 code words. Using data sectors X.0 and X.1 as an example, code words cw.0˜cw.8 belong to data sector X.0, code words cw.10˜cw.18 belong to data sector X.1, the left side of code word cw.9 belongs to data sector X.0, and the right side of code word cw.9 belongs to data sector X.1. Here, the length of each code word is 248 bytes, therefore the length of code word cw.9 belongs to data sector X.0 is 108 bytes, and that belonging to data sector X.1 is 140 bytes. Moreover, the length of each code word (248 bytes) includes 32 bytes of parity codes for generating the syndrome, therefore the code words amount of a data sector for storing is (248−32)×9+108−4 (EDC codes, not shown)=2048 codes.
The data sectors in the data cluster can be replaced with newly added data sectors by random sector writing. For example, additional data sectors NX.1 and NX.30 (not shown) can be recorded to the Blu-ray disc at the position respectively corresponding to data sectors X.1 and X.30 in the data cluster 10. FIG. 3 is a flowchart illustrating writing of additional data sectors NX.1 and NX.30 to the data cluster 10 by a conventional method. First, a template region is allocated from a memory device to store additional data sectors NX.1 and NX.30 (step S1). Next, data sectors X.0, X.1˜X.31 are read from the Blu-ray disc and stored to the memory device for decoding to confirm accuracy of data sectors X.0, X.1˜X.31 (step S2). Next, additional data sectors NX.1 and NX.30 are stored to data cluster 10, and data sectors X.1 and X.30 are replaced with additional data sectors NX.1 and NX.30 (step S3). Than, data cluster 10 comprising data sectors X.0, X.2-X.29 and X.31, and additional data sectors NX.1 and NX.30 are encoded (step S4). Finally, the encoded data is recorded to the Blu-ray disc (step S5).
However, the conventional method requires addition of a template region of memory for storing entire data sectors NX.1 and NX.30, which consumes memory space. In addition, the conventional method must replace the original data sectors X.1 and X.30 with data sectors NX.1 and NX.30 at step S3, which consumes memory bandwidth.